home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: ODF and printing (II)
- Sent: 8/8/96 1:45 AM
- Received: 8/8/96 8:57 AM
- From: Oliver Breidenbach, oliver@boinx.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- ((Sorry if this is a resent, somehow Cyberdog decided to send the
- incomplete first draft. I changed a lot!))
-
- Henri,
-
- >Did you try to print your part using another container (ODFDraw) or
- >implement printing in your part and check what was the output.
-
- thanks for your reply. Yes, I checked printing with ODFDraw R1 and got
- the same result. No, we did not implement printing ourselves. I had a
- look at the docmentation for implementing printing, but it only deals
- with the problem of not rendering certain portions of your view and
- changing the print dialogs. It does not talk about the precision of
- positioning graphical objects.
-
- As I said we just changed the Hello demo part code:
-
- void CLotsOSwimmersFrame::Draw(Environment *ev, ODFacet* odFacet,
- ODShape* invalidShape) // Override
- {
- FW_CViewContext fc(ev, this, odFacet, invalidShape);
- FW_CRect invalidRect;
- fc.GetClipRect(invalidRect);
-
- FW_CRectShape::RenderRect(fc, invalidRect, FW_kFill,
- FW_kWhiteEraseInk);
-
- FW_CRect lotsoSwimmersRect = GetBounds(ev);
-
- FW_CPoint myX = lotsoSwimmersRect.TopLeft();
- FW_CPoint myY = lotsoSwimmersRect.BotLeft();
-
- // If you change the steps here, you see the effect!
-
- for (float y = 0.5; y < 25.0; y = y + 1.1)
- {
- FW_CRect myRect = FW_CRect( myX + FW_CPoint(FW_DoubleToFixed(y),
- FW_DoubleToFixed( 5.0)), myY + FW_CPoint(FW_DoubleToFixed(y + 0.3),
- FW_DoubleToFixed(-25.0)));
-
- FW_CRectShape::RenderRect(fc, myRect, FW_kFill,
- FW_CInk(FW_kRGBBlack));
- }
- }
-
- In the printing documentation it says that we can determine if the
- draw method is called for rendering on screen or on printer. However,
- I did not find how we can change the behavior of
- FW_CRectShape::RenderRect to use a higher resolution to position the
- Rectangles on the LaserWriter.
-
- As I said, we just started with ODF the day before yesterday to
- evaluate if we can use it. So we may not have read the critical stuff
- in the documentation yet. So I asumed that FW_CRectShape::RenderRect
- would take care of the transformation for different resolution
- outputs.
-
- Can someone point me to information on how to use a higher resolution
- on printer output? Any help is appreciated. Thanks in advance.
-
- Cheers,
-
- Oliver.
-
-
-